<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-for</title>
</head>

<body>
    <div id="app">
        <h2>望霸霸水果铺</h2>
        <ul>
            <li v-for="(item,index) in list">{{item}}-{{index}}</li>
        </ul>
        <ul>
            <li v-for="(item) in list">{{item}}</li>
        </ul>
    </div>

    <!-- 引入包-->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                index: 0,
                list: ['苹果', '香蕉', '葡萄', '桃子']
            }
        })
    </script>
</body>

</html>